import HTTP from '../utils/http'
import { BASE_URL } from '../config/config'

export default class CommonService extends HTTP {
    changeStatus(data) {
        return new Promise((resolve) => {
            this.axiosGet({
                url: BASE_URL + '/essay/get_essay',
                data,
                success(data) {
                    resolve(data)
                },
                error(error) {
                    alert('网络请求失败！');

                }

            })
        })
    }
    imgUpload(data) {
        return new Promise((resolve) => {
            this.axiosPost({
                url: BASE_URL + '/essay/upload_image',
                data,
                success(data) {
                    resolve(data)
                },
                error(error) {
                    alert('网络请求失败！');

                }

            })
        })
    }
}